<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "pf_client_publish".
 *
 * @property integer $id
 * @property string $client_id
 * @property integer $createdtime
 * @property string $htmlstring
 * @property string $imageurl
 * @property string $title
 * @property double $money
 * @property integer $isactive
 */
class ClientPublish extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'pf_client_publish';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['client_id'], 'required'],
            [['isactive'], 'integer'],
            [['htmlstring'], 'string'],
            [['money'], 'number'],
            [['client_id'], 'string', 'max' => 7],
            [['imageurl'], 'string', 'max' => 200],
            [['title'], 'string', 'max' => 100],
            ['createdtime','default','value'=>time()]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'client_id' => 'Client ID',
//            'createdtime' => 'Createdtime',
            'htmlstring' => 'Htmlstring',
            'imageurl' => 'Imageurl',
            'title' => 'Title',
            'money' => 'Money',
            'isactive' => 'Isactive',
        ];
    }
}
